A Gradual Interpretation of Union Types
نویسندگان
چکیده
Union types allow to capture the possibility of a term to be of several possibly unrelated types. Traditional static approaches to union types are untagged and tagged unions, which present dual advantages in their use. Inspired by recent work on using abstract interpretation to understand gradual typing, we present a novel design for union types, called gradual union types. Gradual union types combine the advantages of tagged and untagged union types, backed by dynamic checks. Seen as a gradual typing discipline, gradual union types are restricted imprecise types that denote a finite number of static types. We apply the Abstracting Gradual Typing (AGT) methodology of Garcia et al. to derive the static and dynamic semantics of a language that supports both gradual unions and the traditional, totally-unknown type. We uncover that gradual unions interact with the unknown type in a way that mandates a stratified approach to AGT, relying on a composition of two distinct abstract interpretations in order to retain optimality. Thanks to the abstract interpretation framework, the resulting language is type safe and satisfies the refined criteria for gradual languages. We also show how to compile such a language to a threesome cast calculus, and prove that the compilation preserves the semantics and properties of the language.
منابع مشابه
تغییر رویکرد گروههای اسلامی ترکیه در روند الحاق به اتحادیه اروپا
This paper aims to investigate the change in the approach of Turkey’s Islamic political, social and economic groups in process of accession to the European :::::::union:::::::. It seems that process of Turkey’s accession to the European :::::::union::::::: that has led to more Europeanization of this country, is one of the most important factors in the gradual change of preferences, behavior an...
متن کاملGradual Refinement Types Extended Version with Proofs
Refinement types are an effective language-based verification technique. However, as any expressive typing discipline, its strength is its weakness, imposing sometimes undesired rigidity. Guided by abstract interpretation, we extend the gradual typing agenda and develop the notion of gradual refinement types, allowing smooth evolution and interoperability between simple types and logicallyrefin...
متن کاملGradual Set-Theoretic Types
Problem and motivation. A static type system can be an extremely powerful tool for a programmer, providing early error detection, and offering strong compile-time guarantees on the behavior of a program. However, compared to dynamic typing, static typing often comes at the expense of development speed and flexibility, as statically-typed code might be more difficult to adapt to changing require...
متن کاملGradual type-and-effect systems
Effect systems have the potential to help software developers, but their practical adoption has been very limited. We conjecture that this limited adoption is due in part to the difficulty of transitioning from a system where effects are implicit and unrestricted to a system with a static effect discipline, which must settle for conservative checking in order to be decidable. To address this hi...
متن کاملAnthropometric Properties versus Physical Performance in Rugby ::union:: Forwards and Backs - A Systematic Review
Background. Rugby ::::::union:::::: is a team sport with a high amount of physical contact during match play. The physical performance and anthropometric characteristics required, differ based on the playing position. Objectives. The objective of this systematic review was to relate anthropometric properties with physical performance parameters in Rugby ::::::union:::::: backs and forwards acr...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2017